using ResxHelper.Logic.Formatters;
using ResxHelper.Object;

namespace ResxHelper.Logic.Readers
{
    public class ResourceFileReaderFactory
    {
        public static IResourceFileReader GetReader(string path, ResourceType type)
        {
            IResourceFileReader reader = null;
            switch (type)
            {
                case ResourceType.Excel:
                    reader = new ExcelResourceFileReader(path);
                    break;
                case ResourceType.Csv:
                    reader = new CsvResourceFileReader(path);
                    break;
                case ResourceType.Resx:
                    reader = new ResxResourceFileReader(path);
                    break;
            }

            return reader;
        }
    }
}
